<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>评价列表</title>
	<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
  </head>
  
  <body background='skin/images/allbg.gif'>
	  <form action="<%=basePath%>admin/comment/list.shtml" id="form1" name="form1" method="get">
		  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
			  <tr>
				<td align="right">
					<select name="field">
						<option value="content" <c:if test="${paramBean.field == 'content'  }">selected</c:if>>内容</option>
					</select>
					<input name="keyword" type="text" id="keyword" value="${paramBean.keyword }" size="20" />
			  		<input type="submit" name="add" value="查询"/>
			  	</td>
			  </tr>
		  </table>
	  </form>
	  <table width="100%" border="0" class="onelineTable" cellpadding="2"
			cellspacing="1" bgcolor="#D1DDAA" align="center">
			<tr align="center" bgcolor="#E7E7E7" height="22">
				<td width="10%">
					会员姓名
				</td>
				<td width="10%">
					会员手机
				</td>
				<td width="10%">
					订单编号
				</td>
				<td width="10%">
					商品名称
				</td>
				<td width="10%">
					评价分数
				</td>
				<td width="15%">
					评价内容
				</td>
				<td width="10%">
					是否显示
				</td>
				<td width="15%">
					评价时间
				</td>
				<td width="10%">
					操作
				</td>
			</tr>
			<c:forEach items="${ pagination.recordList}" var="comment">
				<tr align='center' bgcolor="#FFFFFF"
						onMouseMove="javascript:this.bgColor='#FCFDEE';"
						onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			  		<td>${comment.member.name}</td>
			  		<td>${comment.member.username}</td>
			  		<td>${comment.order.sn}</td>
			  		<td>${comment.product.name}</td>
			  		<td>${comment.score}</td>
			  		<td>${comment.content}</td>
			  		<td>
			  			<c:choose>
			  				<c:when test="${comment.isShow}">显示</c:when>
			  				<c:otherwise>
								不显示
							</c:otherwise>
			  			</c:choose>
			  		</td>
			  		<td><fmt:formatDate value="${comment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			  		<td>
				  		<a href="<%=basePath%>admin/comment/edit.shtml?id=${comment.id}">编辑</a> 
				  		<a href="<%=basePath%>admin/comment/view.shtml?id=${comment.id}">查看</a> 
			  		</td>
			  	</tr>
		  	</c:forEach>
			<tr align="right" bgcolor="#EEF4EA">
				<td height="36" colspan="11" align="center">
					${pagination.pageHtml }
				</td>
			</tr>
	  </table>
  </body>
</html>
